<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="com.sanqing.po.Department" %>
<%@ page import="com.sanqing.po.Position" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
<link href="../css/style.css" rel="stylesheet" type="text/css" />

</head>
<body class="ContentBody">

<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646" class="newfont03">
	<tr class="CTitle" >
		<td height="22" colspan="6" align="center" style="font-size:16px">部门职位信息列表</td>
	</tr>
	<tr bgcolor="#EEEEEE">
		<td width="15%" align="center" height="30">职位名称</td>
		<td width="15%" align="center" >所属部门</td>
		<td width="15%" align="center" >直属上级</td>
		<td width="15%" align="center" >规划人数</td>
		<td width="15%" align="center" >在职人数</td>
		<td width="25%" align="center" >执行操作</td>
	 </tr>
	 <%
     Department dept = (Department)request.getAttribute("dept");
     if(dept!=null&&dept.getPositions().size()>0){ 
       Iterator it=dept.getPositions().iterator();
       while(it.hasNext()){
         Position position=(Position)it.next();
     %>
	<tr bgcolor="#FFFFFF">
		<td height="22" align="center" ><%=position.getName() %>&nbsp;</td>
		<td height="22" align="center" ><%=dept.getName() %>&nbsp;</td>
		<td height="22" align="center" >
		<%if(position.getSuperior()!=null){out.print(position.getSuperior().getName());}%>&nbsp;
		</td>
		<td height="22" align="center" ><%=position.getPlannum() %>&nbsp;</td>
		<td height="22" align="center" ><%=position.getOccunum() %>&nbsp;</td>
		<td height="22" align="center" ><a href="job.do?method=getDetail&id=<%=position.getId()%>">详细</a>&nbsp;<a href="job.do?method=update&id=<%=position.getId()%>">修改</a>&nbsp;<a href="job.do?method=delete&id=<%=position.getId()%>">删除</a></td>
	</tr>
	<%}}else{ %>
	<tr>
    <td height="22" colspan="6" align="center" bgColor="FFFFFF">该信息不存在！！！</td>
  	</tr>
  	<%} %>
</table>
 <p align="center" style="font-size:12px"><a href="addjob.do?deptId=<%=dept.getId()%>&deptName=<%=java.net.URLEncoder.encode(dept.getName(),"utf-8")%>">添加职位</a></p>
</body>
</html>
